package com.xizi.秋招笔试;

import java.util.Scanner;

/**
 * @author xizizzz
 * @description: TODO
 * @date 2021-8-11下午 04:45
 */
public class H {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[][] mat = new int[n][n];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                mat[i][j] = scanner.nextInt();
            }
        }
        int[][] temp = change(mat);
        for (int i = 0; i < temp.length; i++) {
            for (int j = 0; j < temp[0].length; j++) {
                System.out.println(temp[i][j]);
            }
        }


    }

    public static int[][] change(int[][] mat) {
        int[][] temp = new int[mat.length][mat.length];
        int dst = mat.length - 1;
        for (int i = 0; i < mat.length; i++, dst--) {
            for (int j = 0; j < mat[0].length; j++) {
                temp[j][dst] = mat[i][j];
            }
        }
        return temp;
    }
}
